package org.tailor
/**
 * The Design entity.
 *
 * @author    
 *
 *
 */
class Design {
    static mapping = {
         table 'design'
         // version is set to false, because this isn't available by default for legacy databases
         version false
         // In case a sequence is needed, changed the identity generator for the following code:
//       id generator:'sequence', column:'id', params:[sequence:'design_sequence']
         id generator:'identity', column:'id'
    }
    Long id
    String designName
    String url
    Date dateCreated
    java.math.BigDecimal price
    String style
    String description

    static constraints = {
        id(max: 9223372036854775807L)
        designName(size: 1..255, blank: false)
        url(size: 0..255)
        dateCreated()
        price()
        style(inList: ['Fashion','Classic','Casual','Premium'])
        description()
    }
    String toString() {
        return "${designName}" 
    }
}
